<?php
/**
 * Created by PhpStorm.
 * User: liurongdong
 * Date: 2017/3/20 0020
 * Time: 11:20
 */

/**
 * @param $data
 * @param int $status
 * @param string $msg
 */
function response($data=[],$status=200,$msg='success'){
    header('Content-Type:application/json; charset=utf-8'); exit(json_encode(['status' => $status, 'data' => $data, 'msg' => $msg]));
}

if (is_file(__DIR__ . "/upload/files.zip")) {
    response('upload/files.zip');
}else{
    response([],201,'notfind');
}